var express = require('express')
var router = express.Router()

router.get('/', (req, res) => {
    res.render('index')
})

router.get('/test', (req, res) => {
    res.render('test')
})
router.get('/login', (req, res) => {
    res.render('login')
})

router.post('/login', (req, res) => {
    console.log(req.body)
    req.session.userInfo = req.body
    res.redirect('/')
})


module.exports = router